home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Tools / ResCompare 2.6 ƒ / Documentation / About ResCompare < prev    next >
Text File  |  1996-03-06  |  8KB  |  99 lines

  1. About ResCompare…
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10. What is it?
  11. ResCompare is a programmer’s utility that compares resource files and their data forks. It can also update the resources that have changed, show detailed differences between two resources, and generate a self–applying patch application that will convert one or more old versions of a file into a target version.
  12.  
  13. ResCompare requires System 7 or later, plus the Thread Manager. System 7.5 and later versions automatically include Thread Manager; older systems require an Apple–provided extension. Self–applying patches made with ResCompare will run on any system version. ResCompare is a fat application, meaning it runs at native speed on the Power Macintosh. Self–applying patches made with ResCompare are 68K–only, to conserve space and preserve compatibility with older machines.
  14.  
  15. Legal Stuff
  16. This software is FREE. ResCompare is Copyright © 1989–96 by Michael Hecht. All Rights Reserved. You may copy and distribute it freely, so long as you don’t make any money off of it. Please be sure to distribute the ResCompare application and its documentation together.
  17.  
  18. Any patch applications you create using ResCompare are Copyright © 1991–96 by Michael Hecht. All Rights Reserved. You may create and distribute patches for your commercial or non-commercial applications without my consent, so long as you do not remove or alter the “This patch was created…” message from the bottom of the patch info dialog. You may charge your users for any patches you create, but I ask for no royalties or licensing fees from you for using ResCompare to create patches. However, I always like to get e–mail from people who’ve created patches using ResCompare, and I’ve never turned down a complimentary copy of anyone’s software!
  19.  
  20. You should use this program with care. If you don’t understand what a resource is for, learn first; then use this program. As with ResEdit, you can do irreparable damage to a file by changing resources that shouldn’t be changed. This software is a powerful tool; use it with caution. This software comes with no warranty and I am not liable if you damage your resource file with it. Although I have tested the software on several configurations and believe it to be bug–free (or at least bug–light), you, the user, are responsible for any crashes or equipment failure resulting directly or indirectly from its use. Make lots of backups!
  21.  
  22. How do I use it?
  23. ResCompare is easy to use. Just start it up and choose Open from the File menu. Pick a resource file to look at and ResCompare gives you a list of all the resources within that file. This list is pretty handy because it’s sorted by resource type and ID, and it also contains the name and size of each resource. You can print out the entire list, or you can select some resources and copy the formatted list of information to the clipboard. (Note: If the file has a data fork, it is shown as an additional (but possibly very large) resource. Any operation that you can perform on a resource can be performed on the data fork.)
  24.  
  25. But the real fun starts when you choose the Compare with command from the File menu. This command lets you open a second resource file, and it compares each resource in the first file (the master file) with the resource having the same type and ID in the second file (the update file).
  26.  
  27. You can open the update file while the master file is being read. This generally speeds up the comparison process for larger resource files. Under System 7, you can drag any file onto ResCompare. (Note: If you can’t drag files onto ResCompare, try rebuilding your Desktop by restarting with the option and command keys held down.) If the frontmost window is a resource list that hasn’t been compared to anything yet, ResCompare will compare the new file to it. Otherwise, ResCompare will open the new file.
  28.  
  29. After comparing, the resources that are identical are removed from the list (it doesn’t alter the files). All resources that were deleted from the master file are shown in red, with the “deleted” icon (a left–pointing arrow) on the left margin. Any resources that were added to the update file are shown in green, and get the “added” icon (a right–pointing arrow). Any resources whose contents, attributes or names have changed get the “changed” icon (a double arrow), and are shown in blue. Here’s what a window looks like after comparing two resource files.
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42. You can select resources from this list by clicking them. Use the shift key to extend your selection and the command key to form a discontinuous selection. You can also type a resource’s type and ID to scroll to the closest match and select it. Use Select All from the Edit menu to select all resources at once.
  43.  
  44. At the top of the window, the names of the master and update files are shown, along with their version numbers and the names of the volumes they reside on. In the Size column, you can see the “before/after” sizes of each resource. The little “no–write” icon (the slashed pencil) is next to the update file to remind you that it cannot be changed. However, the master file doesn’t have a no–write icon. You can change its resources using the Update command in the Change menu.
  45.  
  46. If you select one or more resources in the list and choose Update, the update is applied to the selected resources. What does that mean? It means that if a resource was added to the update file, it gets added to the master file. A resource that was deleted gets deleted from the master file. A changed resource is copied from the update file to the master file, along with its attributes and resource name. In other words, the selected resources are changed in the master file so that they are identical to the update file. After updating, ResCompare removes the selected resources from the list (since they’re now identical).
  47.  
  48. If you click the no–write icon, ResCompare swaps the master and update files. This is useful if you want to get some changed resources into your master file, and also put some resources you’ve changed into the update file.
  49.  
  50. You can also use the Font and Size menus in the usual manner to adjust the font used. You should probably switch to Helvetica before printing to a LaserWriter.
  51.  
  52. Editing Resources
  53. Select one or more resources and choose Edit resources from the Edit menu. This command opens the master and update resource files in a resource editor (either ResEdit or Resorcerer®) and displays the selected resources. If the resource editor isn’t running, ResCompare will launch it. Use the Choose editor command from the Edit menu to select your preferred resource editor. These commands only work under System 7.
  54.  
  55. Viewing Resource Differences
  56. ResCompare can show you the exact changes to a resource. After comparing files, select a resource and choose Differences from the Change menu. It may take ResCompare a few moments to compute the resource differences; but when it’s done, ResCompare will display a window like this.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90. The top portion of the window displays any differences found in the resource name and attributes. Differences in the resource contents are displayed in a hexadecimal format. Identical, inserted, deleted, and changed sections are shown in their respective colors. If you aren’t using a color monitor, you can refer to the byte offsets listed in the two left–hand columns. The left column is the offset within the master file, and the right column is the offset within the update file. A section has been deleted if it has no update offset, and it has been added if it has no master offset. If the section has both offsets, it has been changed if the hex dump is split into two sections. Otherwise, the section is identical in both files. The same information is also displayed in an ASCII dump in the right–hand column.
  91.  
  92. ResCompare will also show differences if you double–click a resource or select a resource and press return. You can use the Change menu’s Hide same parts command to suppress the display of the identical (black) parts. You can also select any portion of the differences and copy it to the clipboard as text.
  93.  
  94. To contact me
  95. I hope you enjoy ResCompare. If you like it and find it useful, let me hear from you. If you have any suggestions, questions, or bug reports, send me e–mail at hecht@vnet.net.
  96.  
  97. Cheers!
  98. — Michael Hecht
  99.